package com.ctg.itrdc.sysmgr.portal.spring.converter;


import java.sql.Timestamp;
import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.springframework.core.convert.converter.Converter;

public class Str2TimestampConverter implements Converter<String,Timestamp>{

	public Timestamp convert(String source){
		
		if(StringUtils.isNotBlank(source)){
			Long date = Long.parseLong(source);
			return new Timestamp(date);
		}
		return null;
	}
}
